﻿/* CLASS 扩展 */

var Class = function(){
	var klass = function(){
		//初始化，绑定参数。
		this.init.apply(this,arguments);
	};
	klass.prototype.init = function(){
		console.log("klass init...");
	};
	return klass;
}

var Person = new Class;
//重写 INIT 方法
Person.fn = Person.prototype
Person.fn.init = function(){
	console.log("Person init...");
};
Person.fn.run = function(){
	console.log("Person run...");
};

var person = new Person();
person.run();